package sdk.pay.utils;

import android.util.Log;

public final class PayLogUtil {
    private static final String TAG = "junfutong";
    private static int MIN_LEVEL = 0;
    private static int MAX_LEVEL = 2;

    private static void log(String content, int level) {
        if (level >= MIN_LEVEL && level <= MAX_LEVEL)
            Log.d(TAG, content);
    }

    public static void logBase(String str) {
        log("base = " + str, PayLogUtil.Level.BASE_LEVEL);
    }

    public static void logFirst(String str) {
        log("first = " + str, PayLogUtil.Level.FIRST_LEVEL);
    }

    public static void logSecond(String str) {
        log("second = " + str, PayLogUtil.Level.SECOND_LEVEL);
    }

    public static void logThird(String str) {
        log("third = " + str, PayLogUtil.Level.THIRD_LEVEL);
    }

    public static void logFourth(String str) {
        log("fourth = " + str, PayLogUtil.Level.FOURTH_LEVEL);
    }

    public static void logFifth(String str) {
        log("fifth = " + str, PayLogUtil.Level.FIFTH_LEVEL);
    }

    public class Level {
        public static final int BASE_LEVEL = 0;//must need cannot delete
        public static final int FIRST_LEVEL = 1;//others include init Params
        public static final int SECOND_LEVEL = 2;//logic log
        public static final int THIRD_LEVEL = 3;//net log exclude base level
        public static final int FOURTH_LEVEL = 4;//catch exception log
        public static final int FIFTH_LEVEL = 5;//constant log
    }
}
